<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //打印n行n列的星星
        var rows = prompt('请您输入行数:');
        var cols = prompt('请您输入列数:');
        for( var j=0; j<rows ;j++){
            var star ="";
            for(var i=0; i<cols; i++){
                star = star+"*";
            }
            console.log(star);
            
        }
    </script>
</head>
<body>
    
</body>
</html>